package com.hrt.bean;

/***********************************************************************
 * Module:  ShoppingCar.java
 * Author:  Administrator
 * Purpose: Defines the Class ShoppingCar
 ***********************************************************************/

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 购物车基本信息表
 * 
 */
@Entity
@Table(name = "SHOPPING_CAR")
public class ShoppingCar implements Serializable {
	private static final long serialVersionUID = -8051789534368159162L;
	/**
	 * 购物车ID
	 * 
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "SHOPPING_CAR_ID")
	private Long id;
	
	
	/**
	 * 礼品规格ID
	 * 
	 */
	@Column(name = "GI_DETAIL_ID",insertable=false,updatable=false)
	private Long giDetailId;
	
	
	/**
	 * 礼品ID
	 * 
	 */
	@Column(name = "GIFT_ID")
	private Long giftId;
	
	
	/**
	 * 礼品规格名称
	 * 
	 */
	@Column(name = "GI_DETAIL_NAME")
	private String giDetailName;
	
	
	/**
	 * 礼品名称
	 * 
	 */
	@Column(name = "GIFT_NAME")
	private String giftName;
	
	
	/**
	 * 单价
	 * 
	 */
	@Column(name = "SALE_PRICE")
	private Double salePrice;
	
	
	/**
	 * 购买数量
	 * 
	 */
	@Column(name = "TOTAL")
	private Integer total;
	
	
	/**
	 * 总价
	 * 
	 */
	@Column(name = "SUMMERY")
	private Double summery = 0.0d;
	
	/**
	 * 加入购物车时间
	 * 
	 */
	@Column(name = "ADD_TIME")
	private Timestamp addTime;

	/**
	 * 状态 0正常 1货源紧张，2缺货 3冻结
	 * 
	 */
	@Column(name = "STATUS")
	private Integer status;
	/**
	 * 提示信息
	 * 
	 */
	@Column(name = "TIPS")
	private String tips;
	/**
	 * 会员ID
	 * 
	 */
	@Column(name = "MEMBER_ID",insertable=false,updatable=false)
	private Long memberId;
	/**
	 * 0未删除 1已删除
	 * 
	 */
	@Column(name = "IS_DELETE")
	private Integer isdelete = 0;
	/**
	 * 礼品规格
	 */
	@ManyToOne(cascade = {CascadeType.REFRESH,CascadeType.MERGE},optional = false)
	@JoinColumn(name = "GI_DETAIL_ID")
	private GiftDetail giftDetail;
	/**
	 * 会员
	 */
	@ManyToOne(cascade = {CascadeType.REFRESH,CascadeType.MERGE},optional = false)
	@JoinColumn(name = "MEMBER_ID")
	private HRTMember hrtMember;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Integer getIsdelete() {
		return isdelete;
	}
	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}
	public Long getGiDetailId() {
		return giDetailId;
	}
	public void setGiDetailId(Long giDetailId) {
		this.giDetailId = giDetailId;
	}
	public Long getGiftId() {
		return giftId;
	}
	public void setGiftId(Long giftId) {
		this.giftId = giftId;
	}
	public String getGiDetailName() {
		return giDetailName;
	}
	public void setGiDetailName(String giDetailName) {
		this.giDetailName = giDetailName;
	}
	public String getGiftName() {
		return giftName;
	}
	public void setGiftName(String giftName) {
		this.giftName = giftName;
	}
	public Double getSalePrice() {
		return salePrice;
	}
	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}
	public Integer getTotal() {
		return total;
	}
	public void setTotal(Integer total) {
		this.total = total;
	}
	public Double getSummery() {
		return summery;
	}
	public void setSummery(Double summery) {
		this.summery = summery;
	}
	public Timestamp getAddTime() {
		return addTime;
	}
	public void setAddTime(Timestamp addTime) {
		this.addTime = addTime;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getTips() {
		return tips;
	}
	public void setTips(String tips) {
		this.tips = tips;
	}
	public Long getMemberId() {
		return memberId;
	}
	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}
	public GiftDetail getGiftDetail() {
		return giftDetail;
	}
	public void setGiftDetail(GiftDetail giftDetail) {
		this.giftDetail = giftDetail;
	}
	public HRTMember getHrtMember() {
		return hrtMember;
	}
	public void setHrtMember(HRTMember hrtMember) {
		this.hrtMember = hrtMember;
	}

	

}